<html>
<head><meta charset="utf-8"><title>Stability of `AttrId` · t-compiler/help · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/index.html">t-compiler/help</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/Stability.20of.20.60AttrId.60.html">Stability of `AttrId`</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="248334457"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/Stability%20of%20%60AttrId%60/near/248334457" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> xFrednet <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/Stability.20of.20.60AttrId.60.html#248334457">(Aug 04 2021 at 10:49)</a>:</h4>
<p>Does somebody know if the <a href="https://doc.rust-lang.org/nightly/nightly-rustc/rustc_ast/ast/struct.AttrId.html"><code>AttrId</code></a> used by <a href="https://doc.rust-lang.org/nightly/nightly-rustc/rustc_ast/ast/struct.Attribute.html"><code>rustc_ast::ast::Attribute</code></a> is stable between compilations?</p>
<ul>
<li>It doesn't implement <a href="https://doc.rust-lang.org/nightly/nightly-rustc/rustc_data_structures/stable_hasher/trait.HashStable.html"><code>HashStable</code></a> which would suggest to me that it's not stable <span aria-label="thinking" class="emoji emoji-1f914" role="img" title="thinking">:thinking:</span></li>
</ul>



<a name="248347667"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/Stability%20of%20%60AttrId%60/near/248347667" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Hill <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/Stability.20of.20.60AttrId.60.html#248347667">(Aug 04 2021 at 13:14)</a>:</h4>
<p>It isn't - an <code>AttrId</code> gets created by incrementing a global counter</p>



<a name="248376146"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/Stability%20of%20%60AttrId%60/near/248376146" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> xFrednet <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/Stability.20of.20.60AttrId.60.html#248376146">(Aug 04 2021 at 16:48)</a>:</h4>
<p>Okay, good to know, thank you for the response. Do you know if they are stable between the AST and HIR representation?</p>



<a name="248419116"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/Stability%20of%20%60AttrId%60/near/248419116" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Hill <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/Stability.20of.20.60AttrId.60.html#248419116">(Aug 04 2021 at 22:54)</a>:</h4>
<p>Existing attr ids won't change, but new ones could potentially be created</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>